Skip to main content

Bullet Class

Description:

  A record type that creates new Bullet object instances.

__call

Type: Metamethod.

Description:

  A metamethod that creates a new Bullet object instance with the specified BulletDef and Unit objects.

Signature:

metamethod __call: function(
self: BulletClass,
def: BulletDef,
owner: Unit
): Bullet

Parameters:

ParameterTypeDescription
defBulletDefThe BulletDef object that defines the bullet's properties and behavior.
ownerUnitThe Unit object that fired the bullet.

Returns:

Return TypeDescription
BulletThe new Bullet object instance.